package cn.gene.timeyan.privateletter.webapi.demo;

import cn.gene.timeyan.pojo.article.model.Article;
import cn.gene.timeyan.pojo.article.model.Top;
import org.springframework.beans.BeanUtils;

import java.util.Date;

public class copyDemo {
    public static void main(String[] args) {
        Article article = new Article();
        Top top = new Top();
//        private Long articleId;
//        private Long userId;
//        private String articleTitle;
//        private String articleContent;
//        private Long moduleId;
//        private String articleState;
//        private Integer articleLike;
//        private Integer articleCollection;
//        private Integer articleVisit;
//        private Integer articleComment;
//        private Integer articleRetweeted;
//        private Date createTime;
//        private Date updateTime;
        article.setArticleId(1L);
        article.setUserId(1L);
        article.setArticleTitle("ffff");
        article.setArticleContent("fffsdf");
        article.setModuleId(2L);
        BeanUtils.copyProperties(article,top);
        System.out.println(article.toString());
        System.out.println("*********");
        System.out.println(top.toString());
    }
}
